#define _CRT_SECURE_NO_WARNINGS
#pragma once
#include<stdio.h>
#include<assert.h>
#include<stdlib.h>
#include<stdbool.h>

typedef int BinaryTreeDataType;
typedef struct BinaryTree 
{
	BinaryTreeDataType data;
	struct BinaryTree* right;
	struct BinaryTree* left;
}BinaryTree;

void PreOrder(BinaryTree* root);

void InOrder(BinaryTree* root);

void PostOrder(BinaryTree* root);

BinaryTree* CreateTreeNode(BinaryTreeDataType x);

int TreeSize(BinaryTree* root);

int TreeLeaveSize(BinaryTree* root);

int TreeHeight(BinaryTree* root);

int TreeKLevelSize(BinaryTree* root, int k);

BinaryTree* TreeFind(BinaryTree* root, BinaryTreeDataType x);

void LevelOrder(BinaryTree* root);

bool TreeComplete(BinaryTree* root);

void TreeDestory(BinaryTree** root);